package com.Lixiaoqian.PartyHistoryMuseum.net;

/**
 * Singleton Factory with retrofit
 */
public class ApiFactory {

    static BannerApi bannerApi=null;

    public static BannerApi getBannerApiSingleton() {
        synchronized (BannerApi.class) {
            if (bannerApi == null) {
                bannerApi = new ApiRetrofit().getBannerService();
            }
            return bannerApi;
        }
    }
   /* static UserApi userApiSingleton = null;
    static NewApi NewsApiSingleton = null;
    static ResourceApi ResouceApiSingleton = null;
    static NaviApi naviApi = null;

    //return Singleton
    public static UserApi getUserApiSingleton() {
        synchronized (monitor) {
            if (userApiSingleton == null) {
                userApiSingleton = new ApiRetrofit().getUserApiService();
            }
            return userApiSingleton;
        }
    }

    public static NewApi getNewApiSingleton() {
        synchronized (monitor) {
            if (NewsApiSingleton == null) {
                NewsApiSingleton = new ApiRetrofit().getNewApiService();
            }
            return NewsApiSingleton;
        }
    }

    public static ResourceApi getResouceApiSingleton() {
        synchronized (monitor) {
            if (ResouceApiSingleton == null) {
                ResouceApiSingleton = new ApiRetrofit().getResourceService();
            }
            return ResouceApiSingleton;
        }
    }

    public static NaviApi getNaviApiSingleton() {
        synchronized (monitor) {
            if (naviApi == null) {
                naviApi = new ApiRetrofit().getNaviService();
            }
            return naviApi;
        }
    }

    */
}
